#define _CRT_SECURE_NO_WARNINGS 1
#include"List.h"
int main()
{
	LTNode* plist = LTInit();
	LTPushFront(plist, 3);
	LTPushFront(plist, 2);
	LTPushFront(plist, 1);
	LTPushFront(plist, 0);
	printf("头插3 2 1 0\n");
	LTPrint(plist);
	printf("\n");

	LTPushBack(plist, 5);
	LTPushBack(plist, 6);
	LTPushBack(plist, 7);
	printf("尾插5 6 7\n");
	LTPrint(plist);
	printf("\n");

	LTNode* pos = LTFind(plist, 5);
	LTInsert(pos, 4);
	printf("在值为5的节点前插入值为4的节点\n");
	LTPrint(plist);
	printf("\n");

	LTPopFront(plist);
	printf("头删 0\n");
	LTPrint(plist);
	printf("\n");

	LTPopBack(plist);
	printf("尾删 7\n");
	LTPrint(plist);
	printf("\n");

	pos = LTFind(plist, 5);
	LTErase(pos);
	printf("删除值为5的节点\n");
	LTPrint(plist);
	printf("\n");

	printf("计算节点的个数\n");
	int size = LTSize(plist);
	printf("节点个数为%d", size);


	return 0;
}